package com.fh.service.impl;

import com.fh.mapper.CategoryMapper;
import com.fh.model.Category;
import com.fh.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangh
 * @create 2020-07-18 18:35
 */
@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    private CategoryMapper  categoryMapper;

    @Override
    public List<Category> selectArea() {
        return categoryMapper.selectCategory();
    }

    @Override
    public void addArea(Category category) {
        categoryMapper.addArea(category);
    }




    @Override
    public void updateArea(Category area) {
        categoryMapper.updateArea(area);
    }

    @Override
    public void deleteArea(List<Integer> areaId) {
        categoryMapper.deleteArea(areaId);
    }

    @Override
    public Category categoryService(Integer areaId) {
        return categoryMapper.selectAreaId(areaId);
    }
}
